<template>
  <div class="elSearch flex h-[50px] w-[100%] ">
    <div>
      <el-input
      v-for="item in Elsearch"
      :key="item.id"
      v-model="item.value"
      :placeholder="item.placeholder"
      :class="item.class"
      :size="item.size ? item.size : 'mini'"
    ></el-input>
    </div>
    <elButtons :ElButton="searchBtn.length ? searchBtn : defaultBtn"></elButtons>
  </div>
</template>

<script>
export default {
  name: 'elSearch',
  components: {},
  props: {
    // 搜索
    Elsearch: {
      // 接受参数必须是一个 对象 数组
      type: [Object, Array],
      // 必填
      required: true
    },
    searchBtn: {
      type: Array,
      default: () => []
    }
  },
  data () {
    return {
      // 按钮 没传值默认
      defaultBtn: [
        {
          id: 1,
          type: 'primary',
          icon: 'el-icon-search',
          name: '查找',
          size: 'mini'
        },
        {
          id: 2,
          type: 'primary',
          icon: 'el-icon-search',
          name: '添加',
          size: 'mini'
        },
        {
          id: 3,
          type: 'primary',
          icon: 'el-icon-search',
          name: '导出',
          size: 'mini'
        }
      ]
    }
  },
  // 计算属性
  computed: {},
  watch: {},
  mounted () {},
  methods: {}
}
</script>

<style lang="scss" scoped>

</style>
